$watchhtml = "";
if ( 0 != $wgUser->getID() ) {
- $watchhtml = "<input tabindex='4' type='checkbox' name='wpWatchthis'".($this->watchthis?" checked":"")." id='wpWatchthis'>".
+ $watchhtml = "<input tabindex='4' type='checkbox' name='wpWatchthis'".($this->watchthis?" checked":"")." id='wpWatchthis' />".
"<label for='wpWatchthis'>{$watchthis}</label>";
}
- $checkboxhtml = $minoredithtml . $watchhtml . "<br>";
+ $checkboxhtml = $minoredithtml . $watchhtml . "<br />";
if ( "preview" == $formtype) {
$previewhead="<h2>" . wfMsg( "preview" ) . "</h2>\n<p><large><center><font color=\"#cc0000\">" .
# Otherwise, show a summary field at the bottom
$summarytext = htmlspecialchars( $wgLang->recodeForEdit( $this->summary ) ); # FIXME
if( $this->section == "new" ) {
- $commentsubject="{$subject}: <input tabindex='1' type='text' value=\"$summarytext\" name=\"wpSummary\" maxlength='200' size='60'><br>";
+ $commentsubject="{$subject}: <input tabindex='1' type='text' value=\"$summarytext\" name=\"wpSummary\" maxlength='200' size='60' /><br />";
$editsummary = "";
} else {
$commentsubject = "";
- $editsummary="{$summary}: <input tabindex='3' type='text' value=\"$summarytext\" name=\"wpSummary\" maxlength='200' size='60'><br>";
+ $editsummary="{$summary}: <input tabindex='3' type='text' value=\"$summarytext\" name=\"wpSummary\" maxlength='200' size='60' /><br />";
}
if( !$this->preview ) {
# and making lists from lines starting with * # : etc.
#
$a = explode( "\n", $text );
- $text = $lastPref = "";
+ $text = "<p>"; # ??
+ $lastPref = "";
$this->mDTopen = $inBlockElem = false;
if ( ! $linestart ) { $text .= array_shift( $a ); }
if ( " " == $t{0} ) {
$newSection = "pre";
# $t = wfEscapeHTML( $t );
+ } else {
+ $newSection = "p";
}
- else { $newSection = "p"; }
if ( 0 == strcmp( "", trim( $oLine ) ) ) {
$text .= $this->closeParagraph();
--$npl;
}
if ( "" != $this->mLastSection ) {
- if ( "p" != $this->mLastSection ) {
- $text .= "</" . $this->mLastSection . ">";
- }
+ $text .= "</" . $this->mLastSection . ">";
$this->mLastSection = "";
}
wfProfileOut( $fname );
$s .= $this->pageTitle();
$s .= $this->pageSubtitle() ;
$s .= getCategories(); // For some odd reason, zhis can't be a function of the object
- $s .= "\n<p>";
wfProfileOut( $fname );
return $s;
}
// toolbar for common editing functions. It can be disabled in the user preferences.
// The necsesary JavaScript code can be found in style/wikibits.js.
function getEditToolbar() {
-
- global $wgUploadPath,$wgLang;
+ global $wgUploadPath, $wgLang, $wgMimeType;
// toolarray an array of arrays which each include the filename of
// the button image (without path), the opening tag, the closing tag,
"tip"=>wfMsg("hr_tip"))
);
$toolbar ="<script type='text/javascript'>\n";
+
+ $xml = ($wgMimeType == "text/xml");
+ if( $xml ) {
+ $toolbar .= "<![CDATA[";
+ }
+
$toolbar.="document.writeln(\"<div id='toolbar'>\");\n";
foreach($toolarray as $tool) {
}
$toolbar.="addInfobox('" . addslashes( wfMsg( "infobox" ) ) . "','" . addslashes(wfMsg("infobox_alert")) . "');\n";
- $toolbar.="document.writeln(\"</div>\");\n</script>";
+ $toolbar.="document.writeln(\"</div>\");\n";
+
+ if( $xml ) {
+ $toolbar .= "]]>";
+ }
+ $toolbar.="</script>";
return $toolbar;
}
}